/**
 * Created by bellson on 17-11-24.
 */

import React, {Component} from 'react'
import {StackNavigator} from 'react-navigation';
import {browserHistory, Route} from 'react-router'
import {Router, Scene, Actions} from 'react-native-router-flux'
import IndexPage from './routes/indexPage'
import RectifyBill  from './routes/RectifyBill';
import TroubleCollection from './routes/TroubleCollection'
import SignIn from './routes/SignIn';
import Login from './routes/login'
import ProjectsList from './routes/ProjectsList'
import TasksList from './routes/TasksList'
import TasksOperations from './components/tasksList/taskOperations'
import Sign from './routes/Sign'
import Signature from './routes/Signature'
import Capture from './routes/Capture'
import Photograph from './routes/Photograph'
import ReceiveTask from './routes/TaskReceive'
import SignOut from './routes/SignOut';
import MasterTaskList from './routes/master/TaskList';
import MasterTaskForm from './routes/master/TaskForm';
import TaiZhang from './routes/TaiZhang';
import TaiZhangDetail from './routes/TaiZhangDetail'
import Examination from './routes/Examination'
import ExaminationDetail from './routes/ExaminationDetail'
import PersonalInfoes from './routes/PersonalInfoes'
import EditPwd from './routes/EditPwd'
import StateTracking from './routes/StateTracking'
import TaskCenter from './routes/TaskCenter'
import ZhengGaiDan from './routes/ZhengGaiDan'
import ProjectDetail from './routes/ProjectDetail'



const RootNavigator = StackNavigator({
  Home: {
    screen: IndexPage,
  },
  Page1: {
    screen: Login,
  },
});

class NewRouter extends Component {



  render() {
    return (
      <Router>
        <Scene key="root">

          {/*接收任务*/}
          <Scene key="ReceiveTask" component={ReceiveTask} title="接收任务"/>

          {/*拍照*/}
          <Scene key="Photograph" hideNavBar={true} component={Photograph}/>

          {/*拍照页*/}
          <Scene key="Capture" hideNavBar={true} component={Capture}/>

          {/*登录*/}
          <Scene key="Login" initial={true} hideNavBar={true} component={Login} title="登录"/>

          {/*首页*/}
          <Scene key="IndexPage" hideNavBar={true} component={IndexPage} title="贵安新区规划建设管理局现场监督PDA系统"/>

          {/*整改单*/}
          <Scene key="RectifyBill" component={RectifyBill} title={'巡查记录'}/>

          {/*问题集*/}
          <Scene key="TroubleCollection" component={TroubleCollection} title={'问题集'}/>

          {/*签到*/}
          <Scene key="SignIn" component={SignIn} title="签到"/>

          {/*签退*/}
          <Scene key="SignOut" component={SignOut} title={'签退'}/>

          {/*项目列表*/}
          <Scene key="projectsList" component={ProjectsList} title={'在监项目'} />

          {/*任务列表*/}
          <Scene key="tasksList" component={TasksList} title={'任务列表'} />

          {/*任务操作*/}
          <Scene key="taskOperations" component={TasksOperations} title={'任务操作'}/>

          {/*签到*/}
          <Scene key="Sign" component={Sign}/>

          {/*签名页*/}
          <Scene key="Signature"  component={Signature} title="签名"/>

          {/*站长---任务列表*/}
          <Scene key="masterTaskList" component={MasterTaskList} title={'任务列表'}/>

          {/*站长---选择项目与监督员*/}
          <Scene key="masterTaskForm" component={MasterTaskForm} title={'添加任务'}/>

          {/*台帐*/}
          <Scene key="taizhang" component={TaiZhang} title={'台帐记录'}/>

          {/*台帐详情*/}
          <Scene key="taiZhangDetail" component={TaiZhangDetail} title={'台帐详情'}/>

          {/*审查整改单*/}
          <Scene key="Examination" component={Examination} title={'审核整改单'}/>

          {/*审查整改单详情*/}
          <Scene key="ExaminationDetail" component={ExaminationDetail} title={'审核整改单详情'}/>

            {/*个人信息*/}
          <Scene key="PersonalInfoes" component={PersonalInfoes} title={'个人信息'}/>

            {/*修改密码*/}
          <Scene key="EditPwd" component={EditPwd} title={'修改密码'}/>

            {/*状态追踪*/}
          <Scene key="StateTracking" component={StateTracking} title={'进度查看'}/>

            {/*监督任务管理中心*/}
          <Scene key="TaskCenter" component={TaskCenter} title={'监督任务管理中心'}/>

            {/*整改回复单*/}
          <Scene key="ZhengGaiDan" component={ZhengGaiDan} title={'整改回复单'}/>

            {/*项目详情*/}
          <Scene key="ProjectDetail" component={ProjectDetail} title={'项目详情'}/>

        </Scene>
      </Router>
    )
  }
}

export default NewRouter

// export default RootNavigator;
